package org.hospital.service;

import java.util.List;

import org.hospital.entity.Client;
import org.hospital.entity.Employee;

import com.alibaba.fastjson.JSONArray;

public interface UserService {
	
	Employee getEmployeeById(int employeeId);
	
	String addEmployee(Employee entity);
	
	String saveEmployee(Employee entity);
	
	Employee getEmployeeByCode(String employeeCode);
	
	List<Employee> getClinicPrincipal();
	
	List<Employee> getDepartmentPrincipal(int clinicId);
	 
	Client getClentById(int clientId);
	
	Client addClient(Client client);
	
	Client saveClient(Client client);
	
	/**
	 * 获取所有病人
	 * @return
	 */
	JSONArray getAllClient(int pageIndex,int pageSize);
	
	/**
	 * 获取病人总数
	 * @return
	 */
	Long getClientNumber();
	
	/**
	 * 模糊查询用户
	 * @param name
	 * @return [name,clientId,sex,sexInt,identity,birthdate]
	 */
	JSONArray searchClientByName(String name);
	
	/**
	 * 通过身份证获取客户
	 * @param identity
	 * @return
	 */
	JSONArray getClientByIdentity(String identity);
	
	/**
	 * 获取门诊所以在职员工
	 * @param clinicId
	 * @return
	 */
	JSONArray getClinicEmployee(int clinicId);
	
	/**
	 * 获取门诊所有员工的数目(包括离职的)
	 * @param clinicId
	 * @return
	 */
	Long getClinicEmployeeNumber(int clinicId);
	
	/**
	 * 获取科室所以在职员工
	 * @param clinicId
	 * @return
	 */
	JSONArray getDepartmentEmployee(int departmentId);
	
	JSONArray getEmployeeData(int clinicId,int pageIndex,int pageSize);
	
	JSONArray getSearchEmployeeData(int clinicId,String search);
	
	List<Client> isRepeatIdentity(String identity);
}
